package org.jeecg.modules.app.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.member.entity.Member;
import org.jeecg.modules.app.service.ITeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description: 团队接口
 * @author: Young Jun
 * @date: 2024年09月24日 11:39
 */
@Api(tags = "小程序团队接口")
@RestController
@RequestMapping("/app/team")
@Slf4j
public class TeamController {

    @Autowired
    private ITeamService teamService;

    @ApiOperation(value = "我的团队", notes = "我的团队")
    @GetMapping("/getMyTeam")
    public Result<List<Member>> getMyTeam() {
        return Result.OK(teamService.getMyTeam(null));
    }

    @ApiOperation(value = "排行榜列表", notes = "排行榜列表")
    @GetMapping("/getRank")
    public Result<List<Member>> getRank() {
        return Result.OK(teamService.getRankList());
    }
}
